<?
    /** Index page. Simple wrapper page.
     *
     *  This code is licensed under GPL2.
     *  See LICENSE or www.gnu.org for more details.
     *
     *  @author Henri Ranki, Jyry Kuukkanen
     *  $Id: index.php,v 1.3 2005/03/12 17:07:01 jyry Exp $
     */

    /* Get include path delimiter */
    if (strtolower(substr($_ENV["OS"], 0, 3) == "win")) {
        $path_delim = ";";
    } else {
        $path_delim = ":";
    }; // else if

    /* Ensure that "." is in include_path */
    $inc_paths = ini_get("include_path");
    if (strpos($inc_paths, $path_delim) ||
        (substr($inc_paths, 0, 1) == $path_delim)) {
        $inc_paths = explode($path_delim, $inc_paths);
    } else {
        $inc_paths = array($inc_paths);
    };
    if (!in_array(".", $inc_paths)) $inc_paths[] = ".";
    $inc_paths[] = "../solib";
    ini_set("include_path", implode($path_delim, $inc_paths));

    @include("index.inc.php");
    include("sodebug.php");
    include("jarva.php");


    /* Debug parameters. Change these in dataxi.ini */
    $debug_file = dzGetIniItem("debug", "file", "dataxi");
    $debug_level = dzGetIniItem("debug", "level", "dataxi");
    $debug_format_html = dzGetIniItem("debug", "format_html", "dataxi", "bool");
    $debug_filter = dzGetIniItem("debug", "filter", "dataxi");

    $app = new jarva();
    $app->DebugLevel = $debug_level;
    $app->FormatDebugHtml = soCaseConv($debug_format_html[0], "L") == "y";
    $app->DebugLogFile = $debug_file;
    $app->DebugFilter = $debug_filter;
    $app->runJarva();
?>
